package ch4.section4;

public class TestTree {
    public static void main(String[] args) {
        BinarySearchTree<String> binarySearchTree = new BinarySearchTree<>();
        binarySearchTree.insert("A");
        binarySearchTree.insert("C");
        binarySearchTree.insert("D");
        binarySearchTree.insert("E");
        binarySearchTree.insert("G");
        binarySearchTree.insert("K");
        binarySearchTree.insert("L");
        binarySearchTree.insert("F");
        binarySearchTree.insert("H");
        binarySearchTree.insert("Y");
        binarySearchTree.insert("X");
        binarySearchTree.insert("I");

//        binarySearchTree.printTree();
        System.out.println("MAX:"+binarySearchTree.findMax());
        System.out.println("MIN:"+binarySearchTree.findMin());
        System.out.println(binarySearchTree.contains("Z"));
        System.out.println(binarySearchTree.contains("L"));
        binarySearchTree.remove("L");
        System.out.println(binarySearchTree.contains("L"));

    }
}
